package com.qyl.honghengshop.dao.impl;

import org.apache.ibatis.session.SqlSession;

import com.qyl.honghengshop.dao.BaseDao;
import com.qyl.honghengshop.dao.UserDao;
import com.qyl.honghengshop.dto.User;
import com.qyl.honghengshop.mapper.UserMapper;


public class UserDaoImpl extends BaseDao implements UserDao {

	@Override
	public User getUserByUserIdAndPwd(String userId, String pwd) {

		SqlSession sqlSession = this.getSqlSession();
		
		UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
		
		User user = userMapper.getUserByUserIdAndPwd(userId,pwd);
		
		this.closeSqlSession();
		
		return user;
	}

}
